#include<bits/stdc++.h>
#define int long long
using namespace std;
const int Maxn = 100010;
int n, m, Q;
int a[Maxn];
vector<int> Tree[Maxn];
struct _Query{
	int x, y, p;
}Query[Maxn];
int ans[Maxn];
signed main(){
	ios::sync_with_stdio(false);
	freopen("shu.in", "r", stdin);
	freopen("shu.out", "w", stdout);
	cin >> n >> m >> Q;
	for(int i = 1 ; i < n ; i++){
		int x, y;
		cin >> x >> y;
		Tree[x].push_back(y);
		Tree[y].push_back(x);
	}
	for(int i = 1 ; i <= Q ; i++)
		cin >> Query[i].x >> Query[i].y >> Query[i].p;
	for(int i = 1 ; i <= m ; i++){
		int x;
		cin >> x >> a[x];
	}
	int s = 0;
	for(int i = 2 ; i <= n ; i++){
		s++;
		if(a[i] >= s) s = 0;
		ans[i] = s;
	}
	for(int i = 1 ; i <= Q ; i++){
		if(Query[i].p >= ans[Query[i].x]) cout << "YES" << '\n';
		else cout << "NO" << '\n';
	}
	return 0;
}